<{assign var="page_title" value="授与权限" }>
<{include file="FASHION/page_header.html"}>

<h3><{$page_title}></h3>

UserName: <{$user.name}> <br/>
NickName: <{$user.nickname}> <br/>
GroupInfo: <{$user.group_id}>/<{$user.group_title}> <br/>
Roles:

<form method="post">
<ul>
<{foreach item=r from=$user.roles}>
	<{if $r.type}>
	<li>
		<input type="checkbox" checked disabled />
		<i style="color:gray;"><{$r.title}><{if $r.type==1}>[组]<{/if}></i>
	</li>
	<{/if}>
<{/foreach}>
<{foreach item=r from=$roles}>
	<li>
		<input type="checkbox" value="<{$r.role_id}>" name="role[]" id="role_<{$r.role_id}>" />
		<label for="role_<{$r.role_id}>"><{$r.title}></label>
	</li>
<{/foreach}>
</ul>
<input type="hidden" name="user_id" value="<{$user.user_id}>" />
<input type="submit" value="授与用户权限" />
<input type="button" value="返回" onclick="location.href='<{url a=user}>';" />
</form>

<script>
<{foreach item=rid from=$user_roles}>
$("#role_<{$rid}>").attr('checked', true);
<{/foreach}>
</script>

<{include file="FASHION/page_footer.html"}>